<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
  <script>
     //搜索数字并返回找到的数字
     var str="haj123sdk54hask33dkhalsd879";
	 var patten = /\d/g;
	 console.log("搜索数字并返回找到的数字:"+str.match(patten));
  </script>
</html>
